package com.example.testall.aspect.curring;


public class Closure {
    private  String version="";

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public static void main(String[] args) {
        Closure c1=new Closure();
        c1.version="1.0";
        Moment m1=c1.getMoment();
        System.out.println(m1.getVersion());

        c1.version="2.0";
        Moment m2=c1.getMoment();
        System.out.println(m2.getVersion());
    }

    public Moment getMoment(){
        return () -> version;
    }
}
